<template>
	<view>
		<cu-custom :isBack="true" :bgColor="'bg-'+theme">
			<block slot="backText"></block>
			<block slot="content"><text>{{title}}</text></block>
		</cu-custom>
		<view class="whole-box">
			<view class="top-box">
				<image class="coupon-top-bg" src="../../../static/coupon-top-bg.png"></image>
				<view class="top-box-info">
					<view class="info-box">
						<view class="data-box">
							<text class="name">今日分润</text>
							<text class="number">888</text>
						</view>
					</view>
					<view class="info-box info-box-margin">
						<view class="data-box">
							<text class="name">今日分润</text>
							<text class="number">888</text>
						</view>
						<view class="data-box">
							<text class="name">昨日分润</text>
							<text class="number">888</text>
						</view>
					</view>
				</view>
				
				<view class="cash-rule">提现说明</view>
				
				<view class="cash-btn">立即提现</view>
			</view>

			<view class="menu-box">
				<view class="menu-item">
					<image src="../../../static/coupon-menu-1.png"></image>
					<text>推广名片</text>
				</view>
				<view class="menu-item">
					<image src="../../../static/coupon-menu-2.png"></image>
					<text>推广人统计</text>
				</view>
				<view class="menu-item">
					<image src="../../../static/coupon-menu-3.png"></image>
					<text>推广积分记录</text>
				</view>
				<view class="menu-item">
					<image src="../../../static/coupon-menu-4.png"></image>
					<text>区域奖励</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		mounted() {
			this.getScrollH()
		},
		data() {
			return {
				theme: this.$config.THEME(),
				title: '开团收益',
			}
		},
		onLoad(options) {
			// this.getInfo()
		},
		onShow() {
			// if (this.$common.loginAuth(true)) {
			// 	this.$nextTick((r) => {
			// 		uni.startPullDownRefresh({})
			// 	})
			// }
		},
		methods: {
			getInfo() {
				this.$http
					.get('integral_info', {})
					.then((response) => {
						
					})
					.catch((response) => {
						console.log(response)
					})
			},
		},
	}
</script>

<style>
	.top-box{
		width: 100%;
		height: 390rpx;
		position: relative;
	}
	.top-box .coupon-top-bg{
		width: 100%;
		height: 100%;
	}
	.top-box .top-box-info{
		width: 750rpx;
		height: 390rpx;
		position: absolute;
		top: 0;
		left: 0;
	}
	
	.top-box-info .info-box{
		width: 100%;
		height: 200rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.top-box-info .info-box.info-box-margin{
		/* margin-top: 50rpx; */
		justify-content: space-between;
	}
	.info-box .data-box{
		width: 240rpx;
		flex-shrink: 0;
		height: 200rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.data-box .name{
		font-size: 34rpx;
		color: #3C3A3A;
	}
	.data-box .number{
		margin-top: 20rpx;
		font-size: 44rpx;
		font-weight: bold;
		color: #000000;
	}
	
	.top-box .cash-rule{
		position: absolute;
		top: 80rpx;
		right: 50rpx;
		font-size: 24rpx;
		color: #3C3A3A;
	}
	.top-box .cash-btn{
		position: absolute;
		bottom: -70rpx;
		left: 306rpx;
		width: 150rpx;
		height: 150rpx;
		text-align: center;
		line-height: 150rpx;
		border-radius: 50%;
		background-color: #F2D951;
	}
</style>

<style>
	.menu-box{
		margin-top: 100rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		flex-wrap: wrap;
	}
	.menu-box .menu-item{
		margin-bottom: 20rpx;
		width: 350rpx;
		height: 240rpx;
		border-radius: 15rpx;
		background-color: #FFFFFF;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.menu-item image{
		width: 90rpx;
		height: 90rpx;
	}
	.menu-item text{
		margin-top: 20rpx;
		font-size: 30rpx;
		font-weight: bold;
		color: #434343;
	}
</style>
